package org.s3.project.controller;

import org.s3.project.entity.Category;
import org.s3.project.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author cfx
 * @version 1.0
 * @Description
 * @date 2025/2/9 9:27
 */
@CrossOrigin(origins = "*")
@RestController
public class CategoryController {
    @Autowired
    private CategoryService categoryService;
    //查询菜品分类
    @GetMapping("/getCategorySelect")
    public List<Category> getCategorySelect(){
        return categoryService.list();
    }
}
